import request from '@/utils/request'

// 查询客户管理列表
export function listCustom(query) {
  return request({
    url: '/quality/custom/list',
    method: 'get',
    params: query
  })
}

export function listAllCustom(query) {
  return request({
    url: '/quality/custom/listAll',
    method: 'get',
    params: query
  })
}

// 查询客户管理详细
export function getCustom(customId) {
  return request({
    url: '/quality/custom/' + customId,
    method: 'get'
  })
}

// 新增客户管理
export function addCustom(data) {
  return request({
    url: '/quality/custom',
    method: 'post',
    data: data
  })
}

// 修改客户管理
export function updateCustom(data) {
  return request({
    url: '/quality/custom',
    method: 'put',
    data: data
  })
}

// 删除客户管理
export function delCustom(customId) {
  return request({
    url: '/quality/custom/' + customId,
    method: 'delete'
  })
}

export function getCurrentYearData() {
  return request({
    url: '/quality/custom/getCurrenYearData',
    method: 'get'
  })
}

export function lastFiveYearData() {
  return request({
    url: '/quality/custom/lastFiveCustomCount',
    method: 'get'
  })
}
